﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCMS.Model;
using System.Data;
using SCMS.Utils.DTOs;

namespace SCMS.CoreBusinessLogic.TenderAnalysis
{
    public interface ITAnalysisService
    {
        bool SaveTAnalysis(Model.TenderAnalysi entit);
        void AuthorizeTA(Model.TenderAnalysi ta);
        bool SaveTBidder(Model.TenderBidder entit, List<Model.TenderBidderQuote> TBQuotes);
        bool SaveEvaluators(Model.TenderEvaluator entity);
        void SaveTenderAnalysis(TenderAnalysi ta);
        string GenerateUniqueNumber(CountryProgramme cp);
        List<Model.TenderAnalysi> Search(Model.TenderAnalysi entity);
        List<Model.VStaffDetail> GetStaffs(Guid cpId);
        List<Model.StaffView> GetStaffForTAEvaluation(Guid cpId, Guid taId);
        List<Model.StaffView> GetStaffForTAEvaluation(Guid cpId, Guid taId, Guid StaffId);
        Model.Item GetItemName(Guid itemId);
        Model.TenderAnalysi GetTenderAnalysisEntity(Guid id);
        List<Model.TenderAnalysi> GetTenderColl(Guid countryProgId);
        List<Model.TenderBidder> GetTenderBidderColl(Guid ORID);
        List<Model.TenderBidderQuote> GetTenderBidderQuoteColl(Guid TenderBidderId);
        List<Model.OrderRequest> GetOrderRequests(Guid countryProgId, string orId = "");
        List<Model.OrderRequestItem> GetOrderRequestItems(Guid id);
        List<Model.OrderRequestItem> GetUnprocessedORItems(Guid orId);
        List<Model.Supplier> GetSuppliers(Guid CPid);
        List<Model.Supplier> GetSuppliers(Guid TAid, Guid CPid);
        List<Model.Supplier> GetSuppliers(Guid TAid, Guid CPid, Guid tbId);
        List<Model.ShippingTermView> GetShippingTerms(Guid CPid);
        List<Model.PaymentTerm> GetPaymentTerms(Guid CPid);
        List<Model.TenderAnalysi> GetTenderAnalysesForEval(SystemUser currentUser);
        List<Model.TenderAnalysi> GetTenderAnalysesForAuth(SystemUser currentUser);
        List<Model.Supplier> GetTenderBidderSuppliers(Guid taId);
        TenderBidder GetTenderBidderById(Guid Id);
        TenderBidderQuote GetTenderBidderQuoteByItemId(Guid tenderBidderId, Guid orItemId);
        bool DeleteTenderBidder(Guid tbId);
        List<Model.TenderEvaluator> GetTenderEvaluators(Guid tenderId);
        TenderEvaluator GetTenderEvaluatorByPriority(Guid tenderId, int priority);
        TenderEvaluator GetTenderEvaluatorById(Guid Id);
        TenderEvaluator GetTenderAuthorizer(Guid tenderId);
        bool DeleteTenderEvaluator(Guid teId);
        bool DeleteTenderAnalysis(Guid taId);

        List<TenderAnalysisSummary> Find(List<Guid> ids);
    }
}
